import service from '@/utils/request'

export const getRemainingAvailableTerm = (params) => {
  return service({
    url: '/invoiceItemUsages/getRemainingAvailableTerm',
    method: 'get',
    params
  })
}



// @Tags InvoiceItemUsages
// @Summary 创建销项发票页面
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.InvoiceItemUsages true "创建销项发票页面"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /invoiceItemUsages/createInvoiceItemUsages [post]
export const createInvoiceItemUsages = (data) => {
  return service({
    url: '/invoiceItemUsages/createInvoiceItemUsages',
    method: 'post',
    data
  })
}

// @Tags InvoiceItemUsages
// @Summary 删除销项发票页面
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.InvoiceItemUsages true "删除销项发票页面"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /invoiceItemUsages/deleteInvoiceItemUsages [delete]
export const deleteInvoiceItemUsages = (params) => {
  return service({
    url: '/invoiceItemUsages/deleteInvoiceItemUsages',
    method: 'delete',
    params
  })
}

// @Tags InvoiceItemUsages
// @Summary 批量删除销项发票页面
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除销项发票页面"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /invoiceItemUsages/deleteInvoiceItemUsages [delete]
export const deleteInvoiceItemUsagesByIds = (params) => {
  return service({
    url: '/invoiceItemUsages/deleteInvoiceItemUsagesByIds',
    method: 'delete',
    params
  })
}

// @Tags InvoiceItemUsages
// @Summary 更新销项发票页面
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.InvoiceItemUsages true "更新销项发票页面"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /invoiceItemUsages/updateInvoiceItemUsages [put]
export const updateInvoiceItemUsages = (data) => {
  return service({
    url: '/invoiceItemUsages/updateInvoiceItemUsages',
    method: 'put',
    data
  })
}

// @Tags InvoiceItemUsages
// @Summary 用id查询销项发票页面
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.InvoiceItemUsages true "用id查询销项发票页面"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /invoiceItemUsages/findInvoiceItemUsages [get]
export const findInvoiceItemUsages = (params) => {
  return service({
    url: '/invoiceItemUsages/findInvoiceItemUsages',
    method: 'get',
    params
  })
}

// @Tags InvoiceItemUsages
// @Summary 分页获取销项发票页面列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取销项发票页面列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /invoiceItemUsages/getInvoiceItemUsagesList [get]
export const getInvoiceItemUsagesList = (params) => {
  return service({
    url: '/invoiceItemUsages/getInvoiceItemUsagesList',
    method: 'get',
    params
  })
}

// @Tags InvoiceItemUsages
// @Summary 不需要鉴权的销项发票页面接口
// @Accept application/json
// @Produce application/json
// @Param data query fapiaoReq.InvoiceItemUsagesSearch true "分页获取销项发票页面列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /invoiceItemUsages/getInvoiceItemUsagesPublic [get]
export const getInvoiceItemUsagesPublic = () => {
  return service({
    url: '/invoiceItemUsages/getInvoiceItemUsagesPublic',
    method: 'get',
  })
}

// 提交审核
export const updateExamineStatus = (data) => {
  return service({
    url: '/invoiceItemUsages/updateExamineStatus',
    method: 'post',
    data
  })
}

// 提交开票
export const invoicing = (data) => {
  return service({
    url: '/invoiceItemUsages/invoicing',
    method: 'post',
    data
  })
}

// 提交验证码
export const invoicingSmsCode = (data) => {
  return service({
    url: '/invoiceItemUsages/invoicingSmsCode',
    method: 'post',
    data
  })
}
// 重新提交验证码
export const resendTask = (data) => {
  return service({
    url: '/invoiceItemUsages/resendTask',
    method: 'post',
    data
  })
}

